package com.hahehiho.myalbum;

public class Util {
	private static RecreateInfoStatus worker;
	
	public static RecreateInfoStatus getWorker() {
		return worker;
	}
	
	synchronized public static void startWorker(String path, String thumbnail, String db) {
		boolean isPermission = true;
		
		if(worker != null)
			isPermission = worker.isClose();
			
		if(!isPermission) {
			System.out.println("no start worker");
			return;
		}

		worker = null;
		worker = new RecreateInfoStatus();

		worker.runRecreate(path, thumbnail, db);
	}
}
